package com.hok.misc.ftp;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class FileInfo {
	private Long id;
	private String name;
	private Long size;
	private String sizeStr;
	private String path;
	private String modifiedStr;
	private Date modified;
	private String md5;
	private String change;
	private boolean isFile;
	private boolean isDirectory;
	private List<FileInfo> children;

	public FileInfo() {

	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public FileInfo(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getSize() {
		return size;
	}

	public void setSize(Long size) {
		this.size = size;
	}

	public String getSizeStr() {
		return sizeStr;
	}

	public void setSizeStr(String sizeStr) {
		this.sizeStr = sizeStr;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public String getModifiedStr() {
		return modifiedStr;
	}

	public void setModifiedStr(String modifiedStr) {
		this.modifiedStr = modifiedStr;
	}

	public Date getModified() {
		return modified;
	}

	public void setModified(Date modified) {
		this.modified = modified;
	}

	public String getMd5() {
		return md5;
	}

	public void setMd5(String md5) {
		this.md5 = md5;
	}

	public boolean isFile() {
		return isFile;
	}

	public String getChange() {
		return change;
	}

	public void setChange(String change) {
		this.change = change;
	}

	public void setFile(boolean isFile) {
		this.isFile = isFile;
	}

	public boolean isDirectory() {
		return isDirectory;
	}

	public void setDirectory(boolean isDirectory) {
		this.isDirectory = isDirectory;
	}

	public List<FileInfo> getChildren() {
		return children;
	}

	public void setChildren(List<FileInfo> children) {
		this.children = children;
	}

	public void addChild(FileInfo fileInfo) {
		if (children == null) {
			children = new ArrayList<FileInfo>();
		}
		children.add(fileInfo);
	}

	public List<FileInfo> getChildren(FileInfo fileInfo) {
		if (children == null) {
			children = new ArrayList<FileInfo>();
		}
		return children;
	}
}
